import { postAxios, getAxios } from '@/utils/http'

export const visitRecordApi = {
  // 查询访客记录
  getVisitRecords: (data) => {
    return postAxios('/access/visit/records/list', data);
  },
}

export const trackRecords = {
  // 查询通行轨迹
  getTrackRecords: (data) => {
    return postAxios('/access/track', data);
  }
}

export const homeInfo = {
  getVisitRecords: () => {
    return getAxios('/pass/count');
  },
  getPassRecordsCt: () => {
    return getAxios('/pass/records/ct');
  },
  getPassVisitorCt: () => {
    return getAxios('/pass/visitor/ct');
  },
}


export const userRecordApi = {
  // 查询员工记录
  getUserRecords: (data) => {
    return postAxios('/access/staff/records/list', data);
  },
  batchExport: (data) => {
    return postDownloadAxios('/access/export/batch', data);
  },
  // 用户操作日志详情
  detailUserOperateLog: (data) => {
    return getAxios('/userOperateLog/detail/' + data);
  },
  // 删除用户操作日志
  deleteUserOperateLog: (data) => {
    return getAxios('/userOperateLog/delete/' + data);
  },
  // 查询用户登录日志
  getUserLoginLog: (data) => {
    return postAxios('/login/log/list', data);
  },
  // 删除用户登录日志
  deleteUserLoginLog: (data) => {
    return getAxios('/userLoginLog/delete/' + data);
  }

};